package demo;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LianBao
 * Date: 2024-03-18
 * Time: 18:15
 */

class ScoreException extends Exception {

    //write your code here......
    public ScoreException() {
        super();
    }

    public ScoreException(String s) {
        super(s);
    }

}

public class Test2 {

    public static void main(String[] args) {
        int numbers = 0;
        int words = 0;
        int space = 0;
        int other = 0;
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();

        //write your code here......
        for (int i = 0; i < str.length(); i++) {
            char ch = str.charAt(i);
            if (ch >= 'a' && ch <= 'z' || ch >= 'A' && ch <= 'Z') {
                words++;
                //字母
            } else if ((int) ch <= 57 && (int) ch >= 48) {
                numbers++;
                //数字
            } else if (ch == ' ') {
                space++;
            } else {
                other++;
            }
        }


        System.out.println("英文字母" + words + "数字" + numbers + "空格" +
                space + "其他" + other);
    }

    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int score = scanner.nextInt();
        //write your code here......
        try {
            if (score <= 100 && score >= 0) {
                System.out.println(score);
            } else {
                throw new ScoreException("分数不合法");
            }
        } catch (ScoreException e) {
            System.out.println("分数不合法");
        }
    }
}
